package cn.edu.lingnan.mongodb;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

// 消息实体
@Data
@Document(collection = "chat_message")
public class ChatMessage {
    @Id
    private String id;
    private String sessionId;  // 关联的会话ID（ObjectId字符串）
    private String role;
    private String content;
    private Integer sequenceNumber;
    private Date createdAt;
 }